"use strict";
// ------------------------ 错误码定义 ----------------------
const CODE = {};

// 服务成功
CODE.SUCCESS                = 10000;

// 服务错误
CODE.UNKNOWN_ERR            = 20000;
CODE.PERMISSION_DENIED      = 20001;

// 参数错误
CODE.MISSING_REQUIRE_PARAMS = 30001;
CODE.INVALID_PARAMS         = 30002;
// ---------------------------------------------------------

// ------------------------ 错误描述定义 ----------------------
const MSG = {};
MSG[CODE.SUCCESS]                   = "success";
MSG[CODE.UNKNOWN_ERR]               = "服务不可用";
MSG[CODE.PERMISSION_DENIED]         = "授权权限不足";
MSG[CODE.MISSING_REQUIRE_PARAMS]    = "缺失必选参数";
MSG[CODE.INVALID_PARAMS]            = "非法参数";
// ---------------------------------------------------------



module.exports = {
    CODE : CODE,
    MSG : MSG
};